﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Domain;

namespace DomainTests
{
    [TestClass]
    public class TriangleProperties
    {
        [TestMethod]
        public void TriangleWithAllEqualEdgesMustBeEquilateral()
        {
            const double x = 1.0;
            var pointA = new Point(0.0, 0.0);
            var pointB = new Point(x, Math.Sqrt(3)*x);
            var pointC = new Point(2*x, 0.0);
            var triangle = new Triangle(pointA, pointB, pointC);

            Assert.IsTrue(triangle.IsEquilateral());
        }
        [TestMethod]
        public void TriangleWithTwoEqualEdgesMustBeIsosceles()
        {
            var pointA = new Point(0.0, 0.0);
            var pointB = new Point(1.0, 4.0);
            var pointC = new Point(2.0, 0.0);
            var triangle = new Triangle(pointA, pointB, pointC);

            Assert.IsTrue(triangle.IsIsosceles());
        }
    }
}
